class AddLatitudeAndLongitudeToPrerregister < ActiveRecord::Migration
  def self.up
    add_column :cultural_heritage_cultural_heritage_pre_registers, :gmaps, :boolean, :default=>false
    add_column :cultural_heritage_cultural_heritage_pre_registers, :address, :text
    add_column :cultural_heritage_cultural_heritage_pre_registers, :latitude, :decimal, {:precision=>10, :scale=>6}
    add_column :cultural_heritage_cultural_heritage_pre_registers, :longitude, :decimal, {:precision=>10, :scale=>6}
  end

  def self.down
    remove_column :cultural_heritage_cultural_heritage_pre_registers, :gmaps
    remove_column :cultural_heritage_cultural_heritage_pre_registers, :address
    remove_column :cultural_heritage_cultural_heritage_pre_registers, :longitude
    remove_column :cultural_heritage_cultural_heritage_pre_registers, :latitude
  end
end
